{template header}
<div id="noticeBox">
	<div class="left">
		<strong>当前位置:</strong> {$webglobal['file_news']['position']}
	</div>
</div>
{templatecss news}
{templatecss picture}
<script language="javascript" type="text/javascript">
<!--
function postDigg(ftype,aid) {
	var saveid = GetCookie('diggid');

	if(saveid != null) {
		var saveids = saveid.split(',');
		var hasid = false;
		saveid = '';
		j = 1;
		for(i=saveids.length-1;i>=0;i--)
		{
			if(saveids[i]==aid && hasid) continue;
			else {
				if(saveids[i]==aid && !hasid) hasid = true;
				saveid += (saveid=='' ? saveids[i] : ','+saveids[i]);
				j++;
				if(j==20 && hasid) break;
				if(j==19 && !hasid) break;
			}
		}
		if(hasid) { alert("您已经顶过该帖，请不要重复顶帖 ！"); return; }
		else saveid += ','+aid;
		SetCookie('diggid',saveid,1);
	} else {
		SetCookie('diggid',aid,1);
	}

	$.ajax({
		url: "{WEBURLPATH}/news.php?action=digg&type="+ftype+"&id=" + aid,
		type: "post", 
		success: function (result) {
			if (result == 'failed') {
				
			} else {
				$('#newdigg').html(result);
			}
		}
	});
}
function getDigg(aid) {
	if (aid > 0) {
		$.ajax({
			url: "{WEBURLPATH}/news.php?action=digg&id=" + aid,
			type: "post", 
			success: function (result) {
				if (result == 'failed') {
					
				} else {
					$('#newdigg').html(result);
				}
			}
		});
	}
}

var shortname = "";
var npage = {$webrequest['npage']};
var totalpage = {$webglobal['file_news']['article']['imageTotle']};
var namehand = '108';
var displaytype = 'dy';
var gtimer = null;
 
//大图
function dPlayBig() {
	var imgObj = document.getElementById("bigimg");
	window.open(imgObj.src);
}

//停止幻灯
function dStopPlay() {
	if(gtimer) {
		clearTimeout(gtimer);
		gtimer = null;
		$('#playLabel').html('继续播放');
	} else {
		dPlayNext();
	}
}
//开始幻灯
function dStartPlay() {
	if(npage!=totalpage) {
		gtimer = setTimeout("dPlayNext()", 10000);
	}
}

//上一张
function dPlayPre(){
	if(npage<2) {
		alert("这是第一页");
	} else {
		if(npage==2) {
			location.href = "{WEBURLPATH}/news.php?action=article&id={$webrequest['id']}"
		} else {
			location.href = "{WEBURLPATH}/news.php?action=article&id={$webrequest['id']}&pageno="+(npage-1);
		}
	}
}
//下一张
function dPlayNext() {
	if(npage==totalpage) {
		alert("没有了哦");
	} else {
		if(displaytype=='st' && namehand!='') location.href = namehand+"_"+(npage+1)+shortname;
		else location.href = "{WEBURLPATH}/news.php?action=article&id={$webrequest['id']}&pageno="+(npage+1);
	}
}
-->
</script>
<div class="w960 center clear mt1">
	<div class="pleft">
		<div class="viewbox">
			<div class="title">
				<h2>{$webglobal['file_news']['article']['title']}</h2>
			</div><!-- /title -->
			<div class="info">
				<small>时间:</small>{$webglobal['file_news']['article']['showtime']}<small>来源:</small>{$webglobal['file_news']['article']['from']} <small>作者:</small>{$webglobal['file_news']['article']['writer']} <small>点击:</small><script src="{WEBURLPATH}/news.php?action=count&aid={$webglobal['file_news']['article']['id']}" type='text/javascript' language="javascript"></script>次
			</div><!-- /info -->
			{if $webglobal['file_news']['article']['imageTotle'] > 0}
			<div class="picbox">
				<center>
					<a href='javascript:dPlayBig();' class='c1'>原始图片</a>
					<a href='javascript:dPlayPre();' class='c1'>上一张</a>
					<a href='javascript:dPlayNext();' class='c1'>下一张</a>
					<a href='javascript:dStopPlay();' class='c1' id="playLabel">暂停播放</a>
				</center>
				<a href=""><img src='{$webglobal['file_news']['article']['imageSrc']}' id='bigimg' alt='{$webglobal['file_news']['article']['imageTitle']}' border='0' /></a>
				<a href='{$webglobal['file_news']['article']['imageSrc']}'>{$webglobal['file_news']['article']['imageTitle']}</a>
				<script language='javascript'>dStartPlay();</script>
			</div>
			{/if}
           	<div class="intro">{$webglobal['file_news']['article']['content']}
            <div style="clear:both"></div>
            </div>
			<div class="newdigg" id="newdigg">
			</div>
			 <script language="javascript" type="text/javascript">getDigg({$webglobal['file_news']['article']['id']});</script>

			<div class="boxoff">
				<strong>------分隔线----------------------------</strong>
			</div>
			<div class="handle">
				<!-- /context -->
				<!-- /actbox -->
			</div><!-- /handle -->
		</div><!-- /viewbox -->

<!-- //AJAX评论区 -->

	</div><!-- /pleft -->
	<div class="pright">
    	<div class="mt1">
			<dl class="tbox">
				<dt><strong>热点图集</strong></dt>
				<dd>
					<ul class="e3">
					{loop $webglobal['file_news']['hot'] $article}
						<li>
							<a href="{$article['arcurl']}" class="preview"><img src="{$article['litpic']}" /></a>
							<a href="{$article['arcurl']}" class="title">{$article['title']}</a>
							<span class="intro">更新:{$article['stime']}</span>
						</li>
					{/loop}
					</ul>
				</dd>
			</dl>
		</div>
		<div class="mt1">
			<dl class="tbox">
				<dt><strong>推荐图集</strong></dt>
				<dd>
					<ul class="e9">
					{loop $webglobal['file_news']['commend'] $article}
						<li><a href="{$article['arcurl']}"><img src="{$article['litpic']}" /><span class="title">{$article['title']}</span></a></li>
					{/loop}
					</ul>
				</dd>
			</dl>
		</div>

	</div><!-- /pright -->
</div>
{template footer}